package com.qf.test.config;


import com.qf.test.pojo.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration //代表当前类是一个配置类
public class UserConfig {
    @Bean(name = "user1")
    public User user() {
        User user = new User();
        user.setId(1);
        user.setName("小明");
        return user;
    }


}
